//    Copyright (C) Kherty.  All rights reserved.
using System.Windows.Media;

namespace OpenLS.Spreadsheet.UI
{
    class DashStylesEx
    {
        private static DashStyle _dashDoubled;
        private static DashStyle _dashDotDoubled;
        private static DashStyle _dashDotDotDoubled;
        private static DashStyle _dotDoubled;

        // Properties
        public static DashStyle DashDoubled
        {
            get
            {
                if (_dashDoubled == null)
                {
                    var style = new DashStyle(new[] { 2.0, 1.0 }, 2.0);
                    style.Freeze();
                    _dashDoubled = style;
                }
                return _dashDoubled;
            }
        }

        public static DashStyle Hair
        {
            get
            {
                if (_hair == null)
                {
                    var style = new DashStyle(new[] { 1.0, 1.0 }, 0.5);
                    style.Freeze();
                    _hair = style;
                }
                return _hair;
            }
        }

        private static DashStyle _hair;

        public static DashStyle DashDotDoubled
        {
            get
            {
                if (_dashDotDoubled == null)
                {
                    var style = new DashStyle(new[] { 8.0, 3.0, 3.0, 3.0 }, 0.5);
                    style.Freeze();
                    _dashDotDoubled = style;
                }
                return _dashDotDoubled;
            }
        }

        public static DashStyle DashDotDotDoubled
        {
            get
            {
                if (_dashDotDotDoubled == null)
                {
                    var style = new DashStyle(new[] { 8.0, 3.0, 3.0, 3.0, 3.0, 3.0 }, 0.5);
                    style.Freeze();
                    _dashDotDotDoubled = style;
                }
                return _dashDotDotDoubled;
            }
        }

        public static DashStyle DotDoubled
        {
            get
            {
                if (_dotDoubled == null)
                {
                    var style = new DashStyle(new double[]{2, 2}, 0.0);
                    style.Freeze();
                    _dotDoubled = style;
                }
                return _dotDoubled;
            }
        }
        public static DashStyle MediumDashDot
        {
            get
            {
                if (_MediumDashDot == null)
                {
                    var style = new DashStyle(new[] { 4.0, 2.0, 2.0, 2.0 }, 1.0);
                    style.Freeze();
                    _MediumDashDot = style;
                }
                return _MediumDashDot;
            }
        }


        public static DashStyle MediumDashDotDot
        {
            get
            {
                if (_MediumDashDotDot == null)
                {
                    var style = new DashStyle(new[] { 4.0, 2.0, 2.0, 2.0, 2.0, 2.0 }, 0);
                    style.Freeze();
                    _MediumDashDotDot = style;
                }
                return _MediumDashDotDot;
            }
        }


        private static DashStyle _MediumDashDot;
        private static DashStyle _MediumDashDotDot;

    }
}
